<template>
	<view class="box"
		:style="{paddingTop:530 + 'rpx',background:'url(' + $BASE_URL + pictures[0] +') no-repeat',backgroundSize:'contain'}">
	<!-- 	<view class="navbar" :class="{downNav:scrollTop>60?true:false}" :style="{height:scrollTop>60? customBar+ 80 +'rpx':'80rpx',paddingTop:scrollTop>60?customBar + 'rpx':'1rpx',
			}">
			悟空圈      
		</view> -->
		<view class="list-box" :style="{minHeight:'1100rpx'}">
			<view class="list-item" v-for="(item,index) in list" :key="index" @click="go(item.id)">
				<image :src="item.images_text[0]" mode="aspectFill" style="width: 100%;height: 440rpx;"></image>

				<view class="" style="padding: 20rpx;box-sizing: border-box;">
					<text class="title u-ellipsis-2">
						{{item.title}}
					</text>
				</view>

				<!-- <view class="">
					{{item.all_thumbs}}
				</view> -->
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				pictures: [],
				customBar: 0,
				statusBar: 0,
				scrollTop: 0,
				list: []
			}
		},
		methods: {
			go(id) {
				uni.navigateTo({
					url:'/pages/index/circleinfo?id='+id
				})
			}
		},
		onPageScroll(e) {
			this.scrollTop = e.scrollTop;
			// console.log(this.scrollTop, 'this.scrollTo');
		},
		onShow() {
			this.$http('user.wkq', {}).then(res => {
				console.log(res);
				if (res.code == 1) {
					this.list = res.data.list.data
					console.log(this.list);
				}
			})
		},
		mounted() {
			uni.getSystemInfo({
				success: (e) => {
					this.statusBar = e.statusBarHeight
					this.customBar = e.statusBarHeight + e.titleBarHeight
					// console.log(this.statusBar);
				}
			})


			this.$http('common.getPic', {

			}).then(res => {
				if (res.code === 1) {

					this.pictures = res.data.result.wkq

				}
			});

		
		}
	}
</script>

<style scoped lang="scss">
	.box {
		min-height: 100vh;
		// background-repeat: no-repeat;
		background-size: contain;
		.navbar {

			position: fixed;
			top: 0;
			width: 100%;
			height: 80rpx;
			line-height: 80rpx;
			padding-left: 60rpx;
			font-size: 36rpx;
			// height: 884rpx;

			color: #fff;
			// transition: 0.3s all;
		}

		.downNav {
			top: 0;
			background-color: #fff;
			color: #000;
			// transition: 0.3s all;
			box-sizing: border-box;
		}

		.list-box {
			// margin-top: 532rpx;
			// position: fixed;
			// bottom: 0;
			background-color: #f8f8f8;
			width: 100%;
			padding: 28rpx;
			padding-top: 60rpx;
			padding-bottom: 120rpx;
			box-sizing: border-box;
			display: flex;
			flex-wrap: wrap;
			justify-content: space-between;
			border-top-left-radius: 20rpx;
			border-top-right-radius: 20rpx;

			.list-item {
				width: 330rpx;
				height: 552rpx;
				background-color: white;
				margin-bottom: 20rpx;
				border-radius: 20rpx;
				overflow: hidden;

				.title {
					// padding: 20rpx;
					// box-sizing: border-box;
					overflow: hidden;
				}
			}
		}
	}
</style>
